@use "../global/variables";

.burger-menu {
  display: flex;
  align-items: center;
  padding: 22px;
  box-sizing: border-box;
  background-color: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;

  &:active {
    background-color: variables.$base-secondary;
  }
}

.burger-menu--open {
  .burger-menu__line {
    background-color: transparent;

    &::before {
      top: 50%;
      transform: rotate(45deg);
    }

    &::after {
      top: 50%;
      transform: rotate(-45deg);
    }
  }
}

.burger-menu__line {
  position: relative;
  width: 16px;
  height: 2px;
  background-color: variables.$base-black;
  transition: 0.2s all;
  transform-origin: left center;

  &::before,
  &::after {
    content: "";
    position: absolute;
    left: 0;
    width: 16px;
    height: 2px;
    background-color: variables.$base-black;
    transform-origin: center;
    transition: 0.2s all;
  }

  &::before {
    top: -5px;
  }

  &::after {
    top: 5px;
  }
}
